//
//  Picture.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Picture.h"

@implementation Ppicture

-(id)init
{

    _name = @"清明上河图";
    _value = 9898.444;
    [self info];
    return self;

}

-(void)info
{

    NSLog(@"%@ %.2f", _name, _value);

}


-(void)sale
{

    NSLog(@"%@卖%.2f元", _name, _value);

}


-(NSString *)name
{
    return _name;
}

-(void)setName:(NSString *)name
{
    _name = name;
}
-(CGFloat)value
{
    return _value;
}
-(void)setValue:(CGFloat)value
{
    _value = value;
}
-(id)initWithName:(NSString *)name value:(CGFloat)value
{
    _name = name;
    _value = value;
    return self;
}

+ (id)pictureWithName:(NSString *)name value:(CGFloat)value
{
    Ppicture *p = [[Ppicture alloc] initWithName:name value:value];
    return p;
}

@end
